﻿<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../helpproject.xsl" ?>
<topic template="Default" lasteditedby="Geert" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
  <title translate="true">Tombstoning</title>
  <keywords>
    <keyword translate="true">Tombstoning</keyword>
    <keyword translate="true">Windows Phone 7</keyword>
    <keyword translate="true">Windows Phone 7 Mango</keyword>
  </keywords>
  <body>
    <header>
      <para styleclass="Heading1"><text styleclass="Heading1" translate="true">Tombstoning</text></para>
    </header>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">Tombstoning is made much easier using Catel. As long as you derive from PhoneApplicationPage&lt;TViewModel&gt;, all the tombstoning will be handled for you. This way, you don&apos;t have to care about tombstoning yourself.</text></para>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">There are several modes available on the </text><link displaytype="text" defaultstyle="true" type="topiclink" href="T_Catel_MVVM_ViewModelBase" styleclass="Normal" translate="true">ViewModelBase</link><text styleclass="Normal" translate="true"> that is provided in WP7.</text></para>
    <para styleclass="Normal"><text styleclass="Normal" style="font-weight:bold;" translate="true">Disabled</text></para>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">Tombstoning capabilities are fully disabled for the view model. This means that the last page will be reconstructed (default WP7 behavior), but no additional action is executed.</text></para>
    <para styleclass="Normal"><text styleclass="Normal" style="font-weight:bold;" translate="true">Manual</text></para>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">Tombstoning will be handled manually by the developer of the view models using the PrepareForTombstoneState and RecoverFromTombstoneState methods. So, on each view model you make sure that if you want to support tombstoning, these methods are implemented and Catel will take over all the plumbing such as determining when a page is recovering from a tombstone state.</text></para>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">The great thing the manual mode is that you have full control on what happens during tombstoning.</text></para>
    <para styleclass="Normal"><text styleclass="Normal" style="font-weight:bold;" translate="true">Auto</text></para>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">The view model will store and recover all values of all view model properties automatically.</text></para>
  </body>
</topic>
